window.fightData={

    playerTeam:null,

    armyTeam:null,

    fightParam:null,

    autofight:false

}

window._FIGHTHELPER = {

    prepareFight:function(playerTeam,armyTeam,fightParam){

        window.fightData.playerTeam = playerTeam;
        window.fightData.armyTeam = armyTeam;
        window.fightData.fightParam = fightParam;

        /*
        for(var i=0;i<fightData.armyTeam.length;i++){
            fightData.armyTeam[i].hp=_ROLEDATA.getRealAttr(fightData.armyTeam[i],'maxHp');
            fightData.armyTeam[i].mg=_ROLEDATA.getRealAttr(fightData.armyTeam[i],'maxMagic');
        }*/

    },

    reset(){
        for(var i=0;i<fightData.playerTeam.length;i++){
            fightData.playerTeam[i].hp=200;
        }

        for(var i=0;i<fightData.armyTeam.length;i++){
            fightData.armyTeam[i].hp=200;
        }
    }
}